import 'package:flutter/cupertino.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'bottom_sheet_action_widget.dart';

class BottomSheetUtil {

  /// 显示抽屉层动作列表组件
  /// actionItemList: action列表
  /// actionItemEvent: actionItem点击事件
  void showBottomSheetActionWidget(List<String?> actionItemList,
      {Function(String? title, int index)? actionItemEvent}) {
    Get.bottomSheet(
      BottomSheetActionWidget(actionItemList, actionItemEvent: actionItemEvent),
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.only(
          topLeft: Radius.circular(16.w),
          topRight: Radius.circular(16.w),
        ),
      ),
      backgroundColor: const Color(0xFFFFFFFF),
      isScrollControlled: true,
    );
  }
}
